using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using Microsoft.VisualStudio.Modeling.Validation;

namespace Guava.ChannelTransformations
{
    [ValidationState(ValidationState.Disabled)]
    public partial class GtreeSchema
    {

    }
    [ValidationState(ValidationState.Disabled)]
    public partial class SchemaTables
    {

    }
    [ValidationState(ValidationState.Disabled)]
    public partial class TableToDisplay
    {
        [ValidationMethod(ValidationCategories.Save |
                         ValidationCategories.Menu)]
        public void ValidateNames(ValidationContext context)
        {
            
        }
    }
    [ValidationState(ValidationState.Disabled)]
    public partial class StartPoint
    {

    }

    [ValidationState(ValidationState.Disabled)]
    public partial class EndPoint
    {

    }

    [ValidationState(ValidationState.Enabled)]     
    public partial class Operators
    {
        [ValidationMethod(ValidationCategories.Save |
                         ValidationCategories.Menu)]
        public void ValidateNames(ValidationContext context)
        {
            foreach (Operators op in this.Channel.Operator)
            {
                if (!(this.Equals(op)))
                {
                    if (this.Name == op.Name)
                    {
                        context.LogError("Channel operator name must be unique", "OperatorNameError", this, op);
                    }
                }
            }
            
        }
    }



    
}



  
   
       
        


   
